package org.yangspring.samples.mvc.serviceOracle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yangspring.samples.mvc.daoOracle.DBAUsersDAO;
import org.yangspring.samples.mvc.domainOracle.DBAUsers;

import java.util.List;

import static java.lang.System.out;

/**
 * Created by whyang on 2017/06/22.
 */

@Service
public class DBAUsersServiceImpl implements DBAUsersService {

    private static final Logger logger = LoggerFactory.getLogger(DBAUsersServiceImpl.class);

    @Autowired
    private DBAUsersDAO userDao;

//    public void setUserDao(DBAUsersDAO userDao){
//        this.userDao = userDao;
//    }

    @Transactional
    public List<DBAUsers> listUser(){
        logger.warn("\nOracle DBAUsersServiceImpl\n");
        return this.userDao.listUser();

    }

}
